var info = sessionStorage.yihu_detail == 'undefined' ? {}:JSON.parse(sessionStorage.yihu_detail);
$(".address").html(info.address);
$(".checktime").html(sessionStorage.qiandaoTime||"")
//上传图片
var filer="";
function verify(val) {
	var file = document.getElementById("file").files[0];
	var imgtype = file.type
	console.log("图片格式:"+imgtype)
	if(imgtype == "image/jpeg" || imgtype == "image/png") {
		var reader = new FileReader();
		reader.onload= function (e) {
            document.getElementById('imgdome').setAttribute('src', e.target.result);
			filer=e.target.result;
        };
        reader.readAsDataURL(file);
     }else {
		log_message("请上传jpg或PNG格式的图片")
	}
}
function quit(){
	if(!filer){
		log_message("记得拍照哦")
		return false;
	}
	lrz(filer,{
		width:512
	})
	.then(function(rst){
		ajaxPost(
			Url.ASSESS_CHECKOUT,
			{
				"medicalId":info.medicalId,
				"file":rst.base64.match(/base64,(\S*)/)[1]
			},
			function(data){
				console.log(data)
				if(data.status == "1"){
					log_message("签退成功")
					setTimeout("window.history.go(-2)",1500)
				}
			}
		)
	})
}